﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WXY.Course.DAL;
using WXY.Course.Model;

namespace WXY.Course.BLL
{
    public class AccountBLL
    {
        public UserInfo Get(string userName, string password)
        {
            return AccountDAL.Get(userName, password);
        }

        public UserInfo GetByName(string userName)
        {
            return AccountDAL.GetByName(userName);
        }

        public int UpdatePass(int id, string newPass)
        {
            return AccountDAL.UpdatePass(id, newPass);
        }

        public IList<UserInfo> GetList(PageParams pageParams)
        {
            return AccountDAL.GetList(pageParams);
        }

        public int Delete(int id)
        {
            return AccountDAL.Delete(id);
        }

        public UserInfo Get(int id)
        {
            return AccountDAL.Get(id);
        }

        public int Update(UserInfo info)
        {
            return AccountDAL.Update(info);
        }

        public int Insert(UserInfo info)
        {
            return AccountDAL.Insert(info);
        }
    }
}
